package benchmark.rlm;

import java.awt.LayoutManager;
import java.io.File;

import javax.swing.JButton;

import rlm.RuleLayoutManager;
import alm.ALMException;
import benchmark.TestFrameImpl;

public class BorderLayoutRLMFrame extends TestFrameImpl {

	@Override
	protected void addComponents() {
		for(int i = 0; i < 5; i++){
			JButton button = new JButton("button"+(i+1));
			getFrame().add(button);
		}

	}

	@Override
	protected LayoutManager getLayout() {
		try {
			return new RuleLayoutManager(
					new File("/Users/Robot/Programming/workspaces/SonLayout/RuleLMTester/src/sonia/examples/rlm/layouts/border.pkg"));
//					"/Users/Robot/Programming/workspaces/SonLayout/RuleLMTester/src/sonia/examples/rlm/layouts/BorderLayout.drl");
		} catch (ALMException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	@Override
	protected void setAdditionalStuff() {
		super.setAdditionalStuff();
		getFrame().setSize(500,300);
	}
	
	public static void main(String[] args){
		BorderLayoutRLMFrame frame = new BorderLayoutRLMFrame();
		frame.create();
		frame.show();
	}

}
